package com.xm9m.web.service.controller;

import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.AbstractJsonpResponseBodyAdvice;

/**
 * Spring mvc JSONP 支持
 */
@Order(2)//使用注解方式使bean的加载顺序得到控制,值越小，越先被加载
@ControllerAdvice(basePackages = "com.xm9m")
public class JsonpAdvice extends AbstractJsonpResponseBodyAdvice {
    public JsonpAdvice() {
        super("callback", "jsonp"); //指定jsonpParameterNames
    }
}